package com.huilian.iotbox.mqtt.server.base.service;

import com.huilian.iotbox.data.dto.DisplayRackItemDto;
import com.huilian.iotbox.data.po.DisplayRackItem;
import com.huilian.iotbox.data.po.GiftIncrement;
import com.huilian.iotbox.data.vo.DisplayRackItemVo;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public interface DisplayRackItemService {

    DisplayRackItemVo findDisplayRackItemById(DisplayRackItemDto displayRackItemDto);

    int updateOneById(DisplayRackItemVo displayRackItemVo);

    List<DisplayRackItemVo> findDisplayRackItemByDeviceId(DisplayRackItemDto displayRackItemDto);

    Integer subStockById(DisplayRackItemVo displayRackItemVo, int i, GiftIncrement giftIncrement);

    DisplayRackItemVo findDisplayRackItemByHierarchyAndFreightLane(DisplayRackItemDto displayRackItemDto);

    Integer editVendMachStock(DisplayRackItemDto displayRackItemDto, Integer shipmentNum, int i);

    List<DisplayRackItem> findAllDisplayRackItemByCondition(DisplayRackItem displayRackItemCondition);

    void insertToList(List<DisplayRackItem> addList);

    void updateToList(List<DisplayRackItem> updateList);

    void deleteByBatch(Long displayRackId, Map<Integer, Integer> map);

    void updateStatus(DisplayRackItemDto displayRackItemDto);

    void updateStock(DisplayRackItemDto displayRackItemDto);

    int numberOfFailures(DisplayRackItemDto displayRackItemDto);
}
